﻿using System;
using System.Data;

/// <summary>
/// Summary description for DataProvider
/// </summary>
namespace SBPweb.DNN.PhotoGallery
{
    public abstract class DataProvider
    {
        // singleton reference to the instantiated object
        private static DataProvider objProvider = null;
        // constructor
        static DataProvider()
        {
            CreateProvider();
        }
        // dynamically create provider
        private static void CreateProvider()
        {
            objProvider = ((DataProvider)(DotNetNuke.Framework.Reflection.CreateObject("data", "SBPweb.DNN.PhotoGallery", "")));
        }

        // return the provider
        public static DataProvider Instance()
        {
            return objProvider;
        }

        // all core methods defined below
        //public abstract IDataReader GetPhotoGalleries(int ModuleId);
        public abstract IDataReader GetPhotoGallery(int? PhotoGalleryID, int? ModuleId);
        public abstract int AddPhotoGallery(int ModuleId, string Title, string Source, string BasePath, string Width, string Height, string Background, string Foreground, string ButtonBackground, string ButtonForeground, string ButtonBorder, string ButtonPlayForeground, string CaptionBackground, string CaptionForeground, string ContentBackground, string SelectedThumbnailBorder, string TrackerForeground, decimal? CaptionOpacity, string CaptionFont, string TrackerFont, int? BorderRadius, int? Padding, bool? CaptionVisible, bool? ThumbnailsVisible, bool? TrackerVisible, bool? AutoPlay);
        public abstract void UpdatePhotoGallery(int PhotoGalleryID, int ModuleId, string Title, string Source, string BasePath, string Width, string Height, string Background, string Foreground, string ButtonBackground, string ButtonForeground, string ButtonBorder, string ButtonPlayForeground, string CaptionBackground, string CaptionForeground, string ContentBackground, string SelectedThumbnailBorder, string TrackerForeground, decimal? CaptionOpacity, string CaptionFont, string TrackerFont, int? BorderRadius, int? Padding, bool? CaptionVisible, bool? ThumbnailsVisible, bool? TrackerVisible, bool? AutoPlay);
        public abstract void DeletePhotoGallery(int PhotoGalleryID, int ModuleId);

        public abstract IDataReader GetPhotoGallerySlides(int PhotoGalleryID);
        public abstract int AddPhotoGallerySlide(int PhotoGalleryID, string Caption, string Image, string Thumb, int? OrderIndex, double? Scale, double? CenterX, double? CenterY, int? AnimationBegin, int? AnimationEnd, string BorderColor, int? BorderRadius, bool? BorderVisible, int? BorderWidth, int? Duration, int? EndDelay, double? RotateAngle);
        public abstract void UpdatePhotoGallerySlide(int PhotoGallerySlideId, int PhotoGalleryID, string Caption, string Image, string Thumb, int? OrderIndex, double? Scale, double? CenterX, double? CenterY, int? AnimationBegin, int? AnimationEnd, string BorderColor, int? BorderRadius, bool? BorderVisible, int? BorderWidth, int? Duration, int? EndDelay, double? RotateAngle);
        public abstract void DeletePhotoGallerySlide(int PhotoGallerySlideId);

    }
}